{if !empty($listData)}

    {assign var=permissions value=$smarty.session.authe.USER.PERMISSION.MODULE.$module.CONTROLLER.$controller.ACTION}

    {foreach from=$listData item=item}

        {if $item->STATUS == 1}
            {assign var=status_class value="success"}
            {assign var=status_param value=0}
        {else}
            {assign var=status_class value="danger"}
            {assign var=status_param value=1}
        {/if}

        <tr>
            <td><input type="checkbox" name="del[]" value="{$item->ID}" class="flat-red del"/></td>
            <td>{$item->MODULO}</td>
            <td>{$item->TITULO}</td>
            <td>{$item->MENU_PAI}</td>
            <td>{$item->CONTROLADOR}</td>

            {if in_array("status", $permissions)}<td><a id="btn-status{$item->ID}" class="btn btn-{$status_class} btn-sm btn-flat" onclick="changerStatus(this, {$status_param},{$item->ID})" data-toggle="tooltip" data-original-title="Status"><i class="fa fa-check"></i></a></td>{/if}
            <td>
                {if in_array("view", $permissions)}<a href="{$url}/{$module}/{$controller}/view/{$item->ID}" class="btn btn-primary btn-sm btn-flat" data-toggle="tooltip" data-original-title="Visualizar"><i class="fa fa-eye"></i></a>{/if}
                {if in_array("edit", $permissions)}<a href="{$url}/{$module}/{$controller}/edit/{$item->ID}" class="btn btn-warning btn-sm btn-flat" data-toggle="tooltip" data-original-title="Editar"><i class="fa fa-pencil"></i></a>{/if}
                {if in_array("del", $permissions)}<a onclick="rem(this, {$item->ID})" class="btn btn-danger btn-sm btn-flat" data-toggle="tooltip" data-original-title="Deletar"><i class="glyphicon glyphicon-remove"></i></a>{/if}
            </td>
        </tr>

    {/foreach}

{/if}